<html>
<head><meta charset="utf-8"><title>builtin macros and methods · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/builtin.20macros.20and.20methods.html">builtin macros and methods</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211690799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/builtin%20macros%20and%20methods/near/211690799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/builtin.20macros.20and.20methods.html#211690799">(Sep 29 2020 at 22:04)</a>:</h4>
<p>Hello! i had a few questions i have been wondering about. rustc has compiler builtin macros and methods and other things as evidenced in std docs. But how does that actually work? where are builtin macros defined? how does builtin stuff work, aka how does rustc insert the definitions into the final binary? and how are builtin proc macros defined? Thank you <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>
<p>Edit: if there are any resources on this then i would appreciate them, i read the rustc dev guide a while ago, if there is a section i have either missed it or it was recently added.</p>



<a name="211691155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/builtin%20macros%20and%20methods/near/211691155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/builtin.20macros.20and.20methods.html#211691155">(Sep 29 2020 at 22:07)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/macro-expansion.html?highlight=builtin,macros#eager-expansion">https://rustc-dev-guide.rust-lang.org/macro-expansion.html?highlight=builtin,macros#eager-expansion</a> maybe</p>



<a name="211691222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/builtin%20macros%20and%20methods/near/211691222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/builtin.20macros.20and.20methods.html#211691222">(Sep 29 2020 at 22:08)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/76143">https://github.com/rust-lang/rust/pull/76143</a> also touched some of the relevant code and might give you tips</p>



<a name="211691250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/builtin%20macros%20and%20methods/near/211691250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/builtin.20macros.20and.20methods.html#211691250">(Sep 29 2020 at 22:08)</a>:</h4>
<p>thank you</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>